@props([
    'status' => 'active',
    'type' => 'status' // status, feature, availability
])

@php
    $statusConfig = [
        'status' => [
            'active' => ['class' => 'bg-green-100 text-green-800', 'text' => '启用', 'icon' => '<circle cx="4" cy="4" r="3"/>'],
            'inactive' => ['class' => 'bg-red-100 text-red-800', 'text' => '禁用', 'icon' => '<circle cx="4" cy="4" r="3"/>'],
            'closed' => ['class' => 'bg-gray-100 text-gray-800', 'text' => '已关闭', 'icon' => '<circle cx="4" cy="4" r="3"/>'],
            'expired' => ['class' => 'bg-red-100 text-red-800', 'text' => '已过期', 'icon' => '<circle cx="4" cy="4" r="3"/>'],
        ],
        'feature' => [
            'featured' => ['class' => 'bg-yellow-100 text-yellow-800', 'text' => '推荐', 'icon' => '<circle cx="4" cy="4" r="3"/>'],
            'normal' => ['class' => 'bg-gray-100 text-gray-800', 'text' => '普通', 'icon' => '<circle cx="4" cy="4" r="3"/>'],
        ],
        'availability' => [
            'available' => ['class' => 'bg-green-100 text-green-800', 'text' => '可用', 'icon' => '<circle cx="4" cy="4" r="3"/>'],
            'unavailable' => ['class' => 'bg-red-100 text-red-800', 'text' => '不可用', 'icon' => '<circle cx="4" cy="4" r="3"/>'],
        ]
    ];
    
    $config = $statusConfig[$type][$status] ?? $statusConfig[$type]['active'];
@endphp

<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium {{ $config['class'] }}">
    <svg class="w-1.5 h-1.5 mr-1" fill="currentColor" viewBox="0 0 8 8">
        {!! $config['icon'] !!}
    </svg>
    {{ $config['text'] }}
</span>
